<template>
  <div>
    <!-- screenfull
        1:下载  yarn add screenfull@5.0.0
        2:导入
        3:使用：
           1：看readme
           2:打印一下导入的插件
              方法名翻译
  -->
    <el-button @click="btnClick">全屏切换</el-button>
  </div>
</template>
<script>
import screenfull from 'screenfull'
export default {
  created() {
    console.log(screenfull)
  },
  methods: {
    btnClick() {
      if (screenfull.isEnabled) {
        screenfull.toggle()
      }
    }
  }
}
</script>
<style></style>
